<div class="page-header">
	<h1 style="display: inline;">
		Responses 
		<small>
			for
			<?php echo $this->Html->link($survey['Survey']['name'], array('controller' => 'surveys', 'action' => 'view', $survey['Survey']['id'])); ?>
		</small>
	</h1>
</div>

<div class="row-fluid">
	<div class="span12">
		<table class="table table-hover table-condensed">
			<thead>
				<tr>
					<?php foreach ($data[0] as $colName): ?>
						<th><?php echo $colName; ?></th>
					<?php endforeach; ?>
				</tr>
			</thead>
			<tbody>
				<?php foreach (array_slice($data, 1) as $row): ?>
					<tr>
						<?php foreach ($row as $item): ?>
							<td>
								<?php if (is_array($item)): ?>
									<?php foreach($item as $itemPart): ?>
										<span class="label label-info"><?php echo $itemPart; ?></span>
									<?php endforeach; ?>
								<?php else: ?>
									<?php echo $item; ?>
								<?php endif; ?>
							</td>
						<?php endforeach; ?>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>
</div>